# -*- python -*-
#:kivy 1.0

#:import guiCommon levin.guiCommon
#:import synchroGui levin.synchroGui


<ModeButtonBar>:
    padding: self.width*0.01
    spacing: self.padding[0]
    #buttons: [_wineB, _tastingB]
    LeVinTabButton:
        id: _wineB
        state: 'down'
        text: _("Cellar")
        on_press: guiCommon.commonEvents.dispatch('on_cellar_mode',None); root.button_pressed(self)
    LeVinTabButton:
        id: _tastingB
        text: _("Tastings")
        on_press: guiCommon.commonEvents.dispatch('on_tastinglist_mode',None); root.button_pressed(self)
        
<WineButtonBar>:
    padding: self.width*0.01
    #spacing: self.padding
    LeVinButton:
        icon_src: 'icons/addBottle.png'
        on_press: guiCommon.commonEvents.dispatch('on_start_edit_bottle',None)
    ColorSelectorWid:
        id: _bla
    NumSelectorWid:
        id: _nnum
    TextSelectorWid:
        multiline: False
        id: _tt
    CustomSelectorStarter:
        text: _('Advanced filters')
        on_press: self.startCustom()

<MainWindow>:
    # the main layout
    _mainListContainer: mainListContainer
    _button_bar: button_bar
    _sidepanel: sidepanel
    size_hint: (1.,1.)
    
    BoxLayout:
        orientation: 'vertical'
        size_hint: (1., 1.)
        
        # button bar
        LeVinButtonBar:            
            id: button_bar
            orientation: 'horizontal'
            size_hint: (1., 0.1)
            ModeButtonBar:
                id: _modB
            WineButtonBar:
                id: _bla
            
        # content 
        BoxLayout:            
            id: content_layout
            orientation: 'horizontal'
            size_hint: (1., 0.9)
            
            BoxLayout:
                orientation: 'vertical'                
                id: mainListContainer
                size_hint: (0.6, 1)
            #BoxLayout:            
            #LeVinTabLayout:
            LeVinSidePanel
                id: sidepanel
                size_hint: (0.4, 1)
                
                ## Image:
                ##     source: 'icons/frenchwinebottle.png'


<MainWindowSingle>:
    # the main layout
    _mainListContainer: mainListContainer
    _button_bar: button_bar
    size_hint: (1.,1.)
    
    BoxLayout:
        orientation: 'vertical'
        size_hint: (1., 1.)
        
        # button bar
        LeVinButtonBar:            
            id: button_bar
            orientation: 'horizontal'
            size_hint: (1., 0.1)
            ModeButtonBar:
                id: _modB
            WineButtonBar:
                id: _bla
            
            
        BoxLayout:
            orientation: 'vertical'                
            id: mainListContainer
            size_hint: (0.6, 1)
